<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- 
	Bean.....: TipoDeQuestao
	BeanClass: TipoDeQuestaoController
	Servlet..: 
	Descricao: Selecao para escolher um novo tipo de questao
 -->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:jopvl="http://net.sf.jOpinionPoll/validator"
	xmlns:jopcs="http://net.sf.jOpinionPoll/composition"
	xmlns:jopcc="http://net.sf.jOpinionPoll/tag/component/core">
    <ui:composition template="/pages/publico/template/default.xhtml">
        <ui:define name="titulo">
            <h:outputText value="#{msg['privado.questionario.tipoDeQuestao.titulo']}" />
        </ui:define>
        <ui:define name="corpo">
            <f:view>
                <a4j:keepAlive beanName="Questionario"/>
                <a4j:keepAlive beanName="Questao"/>
                
                <!-- Mensagens de aviso e erro -->
				<jopcs:caixaMensagem />
				
				<!-- titulo -->
                <jopcc:simpleTitle text="#{msg['privado.questionario.tipoDeQuestao.titulo']}" styleClass="boxTitulo" lineStyleClass="boxTituloLine" />
                
                <a4j:form id="formPadrao" styleClass="textoNormal">
                	<input type="hidden" name="questaoId" value="0" />
                	<input type="hidden" name="questionarioId" value="#{Questionario.questionario.id}" />
					<table class="textoNormal" align="center">
						<tr>
							<td align="right">
								<h:outputLabel for="tipoDeQuestao" value="#{msg['privado.questionario.tipoDeQuestao.tipo']}" />
								<span class="valorRequerido">*</span>
							</td>
							<td>
								<h:selectOneMenu id="tipoDeQuestao" required="true"
									value="#{TipoDeQuestao.tipoDeQuestao}" style="width:200px;"
									label="#{msg['privado.questionario.tipoDeQuestao.tipo']}">
									<f:selectItem itemValue="" itemLabel="#{msg['comum.selecioneUm']}" />
									<f:selectItems value="#{TipoDeQuestao.tipoDeQuestoes}" />
								</h:selectOneMenu>
							</td>
						</tr>
						<tr align="center">
							<td colspan="2">
								<h:message styleClass="valorRequerido" for="tipoDeQuestao" />
							</td>
						</tr>
					</table>

					<!-- separador -->
					<rich:separator height="2" width="100%" lineType="dashed"/>

					<!-- dicas de utilizacao -->
					<ul>
						<li>
							<div align="left">
								<span class="textoNegrito">
									<h:outputText value="#{msg['privado.questionario.tipoDeQuestao.dissertativa']}" />
								</span>
								<h:outputText value="#{msg['privado.questionario.tipoDeQuestao.descricaoDissertativa']}" />
							</div>
						</li>
						<li>
							<div align="left">
								<span class="textoNegrito"> 
									<h:outputText value="#{msg['privado.questionario.tipoDeQuestao.alternativa']}" />
								</span>
								<h:outputText value="#{msg['privado.questionario.tipoDeQuestao.descricaoAlternativa']}" />
							</div>
						</li>
					</ul>
					
					<rich:separator height="2" width="100%" lineType="dotted" />

					<table class="textoNormal">
						<tr align="right">
							<td class="caixaTitulo">
								<table>
									<tr>
										<td>
											<h:commandButton styleClass="button" actionListener="#{TipoDeQuestao.criarQuestaoListener}" action="#{TipoDeQuestao.criarQuestaoAction}" value="#{msg['comum.ok']}" />
										</td>
										<td>
											<h:commandButton styleClass="button" value="#{msg['comum.cancelar']}" immediate="true" action="CANCELED"/>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</a4j:form>
			</f:view>
        </ui:define>
    </ui:composition>
</html>